import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/pages/index/index'
import HomePage from 'components/homePage/homePage'
import NewsDetail from '@/pages/newsDetail/newsDetail'
import ThemePage from 'components/themePage/themePage'
import EditorList from '@/pages/editorList/editorList'
import Editor from '@/pages/editor/editor'
import Comment from '@/pages/comment/comment'
import Collect from '@/pages/collect/collect'

Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            component: Index,
            children: [{
                    path: '',
                    component: HomePage
                },
                {
                    path: '/theme/:id',
                    name: 'theme',
                    component: ThemePage
                },
                {
                    path: '/editorList/:id',
                    name: 'editorList',
                    component: EditorList
                },
                {
                    path: '/editor/:editorId/:editorName',
                    name: 'editor',
                    component: Editor
                }
            ]
        },
        {
            path: '/newsDetail/:id',
            name: 'newDetail',
            component: NewsDetail
        },
        {
            path: '/comment/:id/:count',
            name: 'comment',
            component: Comment
        },
        {
            path: '/collect',
            name: 'collect',
            component: Collect
        }
    ]
})